package com.moonshine.utils;

import java.util.HashMap;
import java.util.Map;

public class BenchMark {

	public static Boolean active = false;
	private static final Map<String, Long> sMarks = new HashMap<String, Long>();

	public static void start(String name) {
		if (active)
			sMarks.put(name, System.currentTimeMillis());
	}

	public static void end(String name) {
		if (active)
			System.out.println(name + "(Completed) : "
					+ (System.currentTimeMillis() - sMarks.get(name)));
	}
}
